<?php
/**
 * @version:		$Id: index.php 8 2011-08-02 23:17:34Z epatarroyo $
 * @copyright:		Copyright (C) 2010 OpenWeb Software. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

$doc->addStyleSheet('http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css', $type = 'text/css');
$doc->addStyleSheet($this->baseurl.'/templates/'.$this->template.'/css/mobile.css', $type = 'text/css');

?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <jdoc:include type="head" />
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> 
    <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
    <script>
      try {
        $(function() {
        });
      }
      catch (error) {
        console.error("Your javascript has an error: " + error);
      }
    </script>
    <?php if($googleAnalitycs != ""){ ?>
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', '<?php echo $googleAnalitycs; ?>']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    </script>
    <?php } ?>
  </head>
  <body>
    <div data-role="page">
      
      <div data-theme="a" data-role="panel" id="nav" data-position="left" data-display="overlay">
        <a data-theme="a" href="#header" data-role="button" data-rel="close" data-icon="delete" data-iconpos="notext" class="b-close">Cerrar panel</a>
        <?php if ($this->countModules( 'm-search' )) : ?>
        <jdoc:include type="modules" name="m-search" style="none" />
        <?php endif; ?>
        <?php if ($this->countModules( 'm-nav01' )) : ?>
          <jdoc:include type="modules" name="m-nav01" style="none" />
        <?php endif; ?>
      </div>

      <div data-theme="a" data-role="header" id="header" data-position="fixed">
        <a href="/">
          <img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/m-home.png" />
        </a>

        <h1><jdoc:include type="modules" name="m-tagline" style="none" /></h1>
        
        
        <a href="#nav">
          <img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/m-menu.png" />
        </a>
      </div>

      <div id="m-header">
        <div id="logo">
          <a href="<?php echo $this->baseurl ?>">
            <img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/m-logo.png" alt="<?php echo JText::_('TPL_OW-BYTE_LOGO_ALT'); ?>" />
          </a>
        </div>

        <?php if ($this->countModules('m-header1')) : ?>
        <div id="m-header1"><jdoc:include type="modules" name="m-header1" style="none" /></div>
        <?php endif; ?>

      </div>

      <?php if ($this->countModules( 'nav06' )) : ?>
        <div id="nav06"><jdoc:include type="modules" name="nav06" style="none" /></div>
      <?php endif; ?>
      
      <div data-role="content">
        <?php if ($this->countModules( 'm-top' )) : ?>
        <jdoc:include type="modules" name="m-top" style="xhtml1" />
        <?php endif; ?>

        <div id="component"><jdoc:include type="component" /></div>

        <?php if ($this->countModules( 'm-bottom' )) : ?>
        <jdoc:include type="modules" name="m-bottom" style="xhtml1" />
        <?php endif; ?>
        

      </div>
      
      <div data-theme="c" data-role="footer">
        <?php if ($this->countModules( 'm-footer' )) : ?>
        <div id="m-footer"><jdoc:include type="modules" name="m-footer" style="xhtml1" /><div>
        <?php endif; ?>
      </div>

    </div>
  </body>
</html>